package com.wechat.back.mapper;

import com.wechat.back.pojo.pic.Icons;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface IconsMapper {
    //查询图标
    List<Icons> list(Integer iconId,String iconType);

    @Insert("insert into icons(icon_name, icon_url, icon_type, icon_desc, address_url, create_time, update_time)" +
            " values (#{iconName}, #{iconUrl}, #{iconType}, #{iconDesc}, #{addressUrl}, #{createTime}, #{updateTime})")
    void add(Icons icons);

    @Update("update icons set icon_name=#{iconName}, icon_url=#{iconUrl}, icon_type=#{iconType}, icon_desc=#{iconDesc}, address_url=#{addressUrl}, update_time=#{updateTime} where icon_id=#{iconId}")
    void update(Icons icons);

    @Delete("delete from icons where icon_id=#{iconId}")
    void delete(Integer iconId);
}
